<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const arr =
      [{
        name: '裤子',
        count: 10,
        price: 30
      },
      {
        name: '衣服',
        count: 50,
        price: 30
      }]

    const money = arr.reduce((money, item) => money + item.count * item.price, 0)
    console.log(money)
  </script>
</body>

</html>